u-rustc-llvm-cross-flags
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Sat, 29 Aug 2020 15:54:36 +0000 (16:54 +0100)
committerXimin Luo <infinity0@debian.org>
Sat, 29 Aug 2020 15:54:36 +0000 (16:54 +0100)
===================================================================

Gbp-Pq: Name u-rustc-llvm-cross-flags.patch

src/librustc_llvm/build.rs

index b2c550ad0be9350b0e1c6a51a996f9d575c56393..23c44f005f9db98f33607c94675f924db461fc12 100644 (file)
@@ -235,7 +235,7 @@ fn main() {
         if is_crossed {
             if lib.starts_with("-LIBPATH:") {
                 println!("cargo:rustc-link-search=native={}", lib[9..].replace(&host, &target));
-            } else if lib.starts_with("-L") {
+            } else if lib.starts_with("-L") && lib[2..].contains(&host) {
                 println!("cargo:rustc-link-search=native={}", lib[2..].replace(&host, &target));
             }
         } else if lib.starts_with("-LIBPATH:") {